Closed Bug 1622694 Opened 5 years ago Closed 5 years ago

tools/fuzzing/rust/src/lib.rs: Fix the clippy warnings

Categories

(Developer Infrastructure :: Lint and Formatting, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Sylvestre, Unassigned, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=rust])

+++ This bug was initially created as a clone of Bug #1622692 +++

Filling as a good first bug to learn workflows.

As the change is easy, it is mostly to learn how to contribute to Firefox.

To run the linter:
$ ./mach lint -l clippy tools/fuzzing/rust/ --warnings

Warnings:

xxx/tools/fuzzing/rust/src/lib.rs
  138:38  warning  casting a character literal to `u8` truncates                                                                  clippy::char_lit_as_u8 (clippy)
  153:29  warning  passing a unit value to a function                                                                             clippy::unit_arg (clippy)
  163:27  warning  passing a unit value to a function                                                                             clippy::unit_arg (clippy)
  174:27  warning  passing a unit value to a function                                                                             clippy::unit_arg (clippy)
  211:16  warning  this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)  clippy::trivially_copy_pass_by_ref (clippy)
  243:16  warning  this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)  clippy::trivially_copy_pass_by_ref (clippy)
  256:25  warning  The function/method `get` doesn't need a mutable reference                                                     clippy::unnecessary_mut_passed (clippy)
  268:16  warning  this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)  clippy::trivially_copy_pass_by_ref (clippy)


Tutorial to contribute:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

These warning are fixed in revision ccd521ebc464, so this bug can be closed.

Flags: needinfo?(sledru)

Excellent, thanks :)

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(sledru)
Resolution: --- → FIXED
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.